﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MES_SystemUI.Domain
{
    /// <summary>
    /// 产品生产领料明细表
    /// </summary>
    public class MaterialReceiveDetail
    {
        /// <summary>
        /// 产品生产领料明细主键，自动编号
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int MaterialReceiveDetailId { get; set; }
        /// <summary>
        /// 产品生产领料，外键
        /// </summary>
        [Required]
        public int MaterialReceiveId { get; set; }
        /// <summary>
        /// 生产计划明细，外键
        /// </summary>
        [Required]
        public int ProductionPlanDetailId { get; set; }
        /// <summary>
        /// 领料仓库
        /// </summary>
        [Required]
        public int StoreId { get; set; }
        /// <summary>
        /// 预计需要物料的数量
        /// </summary>
        [Required]
        public int ReceiveCount { get; set; }
        /// <summary>
        /// 数据状态（0正常，1删除）默认值0
        /// </summary>
        [Required]
        public int Status { get; set; } = 0;
        /// <summary>
        /// 创建人，外键
        /// </summary>
        [Required]
        public int CreateUserId { get; set; }
        /// <summary>
        /// 创建时间，默认值当前时间
        /// </summary>
        [Required]
        public DateTime CreateTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 最后一次修改人，外键
        /// </summary>
        public int? LastUpdateUserId { get; set; }
        /// <summary>
        /// 最后一次修改时间
        /// </summary>
        public DateTime? LastUpdateTime { get; set; }
    }
}
